testCase47='DBshop047_编辑积分规则流程'
import  time
from public.action import *
from public.testData import *
from public.tools import*
from public.business import *


firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'客户管理','管理积分','积分规则')
#1.找到积分规则名称为“准守规则” 点击编辑
firefox.find_element_by_xpath('//td[contains(.,"遵守规则")]/following-sibling::td[4]/a[1]').click()

firefox.find_element_by_id('integral_rule_info').clear()
firefox.find_element_by_id('integral_rule_info').send_keys('好好学习') #规则描述改为好好学习
firefox.find_element_by_xpath('//button[@type="submit"][2]').clear() #点击保存积分规则

time.sleep(4)
try:
    firefox.find_element_by_xpath('//td[text()="好好学习"]').is_displayed()
    writeLog('%s 测试通过' % testCase47)
except:
    writeLog('%s 测试不通过' % testCase47)
    getPhoto(firefox)
firefox.quit()